<template>
  <div>
    <c-form title="单据信息" :model="ruleForm" :rules="rules" :isActive="false">
      <el-row :gutter="10">
        <c-input label="单号" :disabled=true />
        <c-input label="单据状态" :required=true />
        <c-input label="开单日期" @onFocus="getFocus" />
        <c-input label="开单人" v-model="input" />
        <c-input label="审核人" />
        <c-input label="审核时间" />
        <c-input label="备注" />
      </el-row>
    </c-form>
    <c-form title="患者信息" :model="ruleForm" :rules="rules">
      <el-row :gutter="10">
        <c-input label="标题" :disabled=true />
        <c-input label="标题2" :required=true />
        <c-input label="标题3" @onFocus="getFocus" />
        <c-input label="标题4" v-model="input" />
        <c-input label="标题" />
        <c-input label="标题" />
        <c-input label="标题标题标题" />
      </el-row>
    </c-form>
    <c-form title="患者信息" :model="ruleForm" :rules="rules">
      <el-row :gutter="10">
        <c-input label="标题" :disabled=true />
        <c-input label="标题2" :required=true />
        <c-input label="标题3" @onFocus="getFocus" />
        <c-input label="标题4" v-model="input" />
        <c-input label="标题" />
        <c-input label="标题" />
        <c-input label="标题标题标题" />
      </el-row>
    </c-form>
    <c-form title="患者信息" :model="ruleForm" :rules="rules">
      <el-row :gutter="10">
        <c-input label="标题" :disabled=true />
        <c-input label="标题2" :required=true />
        <c-input label="标题3" @onFocus="getFocus" />
        <c-input label="标题4" v-model="input" />
        <c-input label="标题" />
        <c-input label="标题" />
        <c-input label="标题标题标题" />
      </el-row>
    </c-form>
    <c-form title="患者信息" :model="ruleForm" :rules="rules">
      <el-row :gutter="10">
        <c-input label="标题" :disabled=true />
        <c-input label="标题2" :required=true />
        <c-input label="标题3" @onFocus="getFocus" />
        <c-input label="标题4" v-model="input" />
        <c-input label="标题" />
        <c-input label="标题" />
        <c-input label="标题标题标题" />
      </el-row>
    </c-form>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    msg: String
  },
  methods: {
    getFocus() {
      this.$refs.content.focus();
    }
  },
  data() {
    return {
      input: "333",
      isFocus: true,
      ruleForm: {
        name: "名称",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      rules: {
        name: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
        ],
        region: [
          { required: true, message: "请选择活动区域", trigger: "change" }
        ],
        date1: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change"
          }
        ],
        date2: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change"
          }
        ],
        type: [
          {
            type: "array",
            required: true,
            message: "请至少选择一个活动性质",
            trigger: "change"
          }
        ],
        resource: [
          { required: true, message: "请选择活动资源", trigger: "change" }
        ],
        desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }]
      },
      label: "",
      key: ""
    };
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.main {
  padding: 20px 20px;
  background: #f6f6f6;
}
</style>
